feat(tasks): dock the agent's task list in a collapsible bar above the composer - #1432
feat(tasks): dock the agent's task list in a collapsible bar above the composer#1432pedramamini wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
🚧 Files skipped from review as they are similar to previous changes (5)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughAdds a collapsible agent task-list bar above the AI composer. It extracts the newest public checklist from logs, renders task statuses, supports dismissal and auto-expansion, persists display settings, and adds tests for the new behavior. ChangesAgent task list display
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to This change adds an opt-in, dismissible task-list bar above the composer while preserving existing inline task cards; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant InputArea
participant AgentTaskListBar
participant findLatestAgentTaskList
participant AgentTaskItems
InputArea->>AgentTaskListBar: pass active tab logs and theme
AgentTaskListBar->>findLatestAgentTaskList: scan logs for latest public checklist
findLatestAgentTaskList-->>AgentTaskListBar: return checklist and entry ID
AgentTaskListBar->>AgentTaskItems: render tasks when expanded
AgentTaskItems-->>AgentTaskListBar: render status rows
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The changes satisfy issue ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThe PR adds an optional, collapsible task-list bar above the active AI tab's composer, deriving the latest checklist from existing logs and sharing task-row rendering with inline cards.
Confidence Score: 4/5The PR appears safe to merge, with a non-blocking edge case where dismissal can leak between tabs when checklist entry IDs collide. The feature and settings wiring are coherent, but dismissal is retained by an unscoped entry ID while the component survives tab switches. Files Needing Attention: src/renderer/components/AgentTaskListBar.tsx Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
Logs[Active tab logs] --> Scan[Find latest checklist]
Scan --> Bar[Docked task-list bar]
Setting[Display setting] --> Bar
Bar --> Summary[Collapsed progress summary]
Bar --> Items[Expanded shared task items]
ToolUpdate[New checklist entry] --> Logs
Reviews (1): Last reviewed commit: "feat(tasks): dock the agent's task list ..." | Re-trigger Greptile |
| ); | ||
| // Keyed by the source log entry, so dismissing hides THIS list and the next | ||
| // checklist the agent writes brings the bar back on its own. | ||
| const [dismissedEntryId, setDismissedEntryId] = useState<string | null>(null); |
There was a problem hiding this comment.
Scope dismissal to the active tab
If two AI tabs contain checklist entries with the same ID, dismissedEntryId persists across the tab switch and suppresses the second tab's checklist even though the user dismissed only the first tab's list. Key the dismissal by tab as well as entry ID, or reset it when the active tab changes.
Knowledge Base Used: Session UI and tabs
CI note: the
|
| Test Files | Tests passed | |
|---|---|---|
main @ 8af06a5 |
1 failed / 1258 passed | 1258 |
| this PR | 1 failed / 1259 passed | 1259 |
Same one failing file, exactly +1 passing file (the new AgentTaskListBar.test.tsx). Nothing here touches FilePreview or the font-zoom path.
Other checks are green: lint-and-format, Analyze (javascript-typescript), CodeRabbit, Greptile.
…e composer Agent checklists (Claude Code / OpenCode TodoWrite, Codex update_plan) already render inline in the transcript, but those cards scroll away as the conversation grows, so "what is the agent working on, and how much is left" stops being answerable without scrolling back to hunt for the last update. This pins the newest checklist for the active AI tab directly above the input box: collapsed to one line (the active task plus a completed/total count and a progress bar), expandable to the full list, rewritten in place as the agent updates its plan, and dismissable per checklist. The list is derived from the tab's own logs - a reverse scan for the last checklist-shaped tool call. Agents rewrite the whole list on every update, so the last one IS the current state; there is nothing to merge. That means no new capture path and no second copy of the state to drift from the transcript. It switches with the tab and survives app restart for free. A checklist written inside a subagent (metadata.parentToolUseId) is skipped. A delegated worker keeps its own private plan and writes it last, so without the guard a Task tool call would replace the plan the user is following. Both behaviors are Display settings, off by default: showAgentTaskListBar renders the bar at all, and autoExpandAgentTaskListBar opens each new checklist to its full list instead of the one-line summary. Under auto-expand a manual collapse applies to that checklist only, so the next update re-expands. The task rows moved into a shared AgentTaskItems, used by both the inline card and the new bar, so the two surfaces can't disagree about what a completed task looks like. Closes #1431
7259d61 to
671d72b
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Closes #1431
Targets
rc.What
Agent checklists (Claude Code / OpenCode
TodoWrite, Codexupdate_plan) already render as an inlineAgentTaskListCardin the transcript, but those cards scroll away as the conversation grows. "What is the agent working on, and how much is left" stops being answerable without scrolling back to hunt for the last update.This pins the newest checklist for the active AI tab directly above the input box:
activeFormwhen it supplies one) plus acompleted/totalcount and a progress bar.Two Display settings, both OFF by default
showAgentTaskListBarautoExpandAgentTaskListBarBoth live under Settings -> Display -> Agent Task List, in a new
AgentTaskListSectionalongsiderc's other extracted Display sections.Expansion state has two modes on purpose, because the two settings want different things:
usePersistedToggle) that survives restart.How
The list is derived from the tab's own logs - a reverse scan (
findLatestAgentTaskList) for the last checklist-shaped tool call. Agents rewrite the whole list on every update, so the last one is the current state; there is nothing to merge across entries.That means no new capture path, no store slice, and no second copy of the state to drift from the transcript. It switches with the tab and survives app restart for free.
Detection reuses the existing shape-based
extractAgentTaskList, so this stays agent-agnostic exactly like the inline card - any provider emitting a{ content, status }-ish array gets it.Notes on specific decisions
rc-only): a checklist carryingmetadata.parentToolUseIdis skipped. A delegated worker keeps its own private plan and writes it last, so without the guard aTasktool call would replace the plan the user is actually following with a scratch list they never asked to see. This is the follow-up themain-targeted version of this PR flagged; it is live here becausercis where subagent nesting exists.AgentTaskItems, used by both the inline card and the new bar, so the two surfaces can't disagree about what a completed task looks like.useMemoonlogsplusReact.memoon the component. The composer re-renders on every keystroke, butlogsonly changes when the agent writes, so the reverse scan stays off the typing path.Validation
tsc --noEmitacross all four tsconfigs: cleaneslint+prettier --checkon every touched file: cleanCI still needs to be green before merge - local validation is single-OS.
Summary by CodeRabbit
New Features
Bug Fixes
Tests